using Domain.Model.Partners;
using Presentation.Web.Client.Models;

namespace Presentation.Web.Client.Areas.PartnersManagement.Models.PartnerDetails
{
    public class PartnerDetailsTabsService 
    {
        public PartialViewModelBase GetTab(string tabName, Partner partner)
        {
            switch (tabName)
            {
                case "General":
                    return new GeneralTabViewModel(partner);

                case "Addresses":
                    return new AddressesTabViewModel(partner);

                case "Contacts":
                    return new ContactsTabViewModel(partner);

                case "Bank accounts":
                    return new BankAccountsTabViewModel(partner);

                case "Contracts":
                    return new ContractsTabViewModel(partner);

                case "History":
                    return new HistoryTabViewModel(partner);

                case "Contact persons":
                    return new ContactPersonsTabViewMode(partner);
            }

            return new GeneralTabViewModel(partner);
        }

        public string GetTabFileName(string tabName)
        {
            switch (tabName)
            {
                case "General":
                    return "_General";

                case "Addresses":
                    return "_Addresses";

                case "Contacts":
                    return "_Contacts";

                case "Bank accounts":
                    return "_BankAccounts";

                case "Contracts":
                    return "_Contracts";

                case "History":
                    return "_History";

                case "Contact persons":
                    return "_ContactPersons";
            }

            return "_General";
        }


    }
}